package com.xiaotu.mybatis.controller;

import com.xiaotu.mybatis.model.AModel;
import com.xiaotu.mybatis.service.AService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Mr.zhang
 * @create 2021-11-17 20:23
 */
@RestController
@AllArgsConstructor
public class AController {

    private final AService aService;

    @GetMapping("getA")
    public AModel getA(){
        return aService.getA();
    }

    @PostMapping("insert")
    public void insert(AModel aModel){
        aService.insert(aModel);
    }

}
